package cn.edu.pku.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.edu.pku.dao.HumanDao;
import cn.edu.pku.dao.HumanmgtDao;

import com.opensymphony.xwork2.ActionSupport;

public class RecoverRemovedHRRecordAction extends ActionSupport implements BaseAction {

	private HttpServletRequest request;
	private HttpServletResponse response;
	private Map att;
	private String humanId;
	
	private HumanDao humanDao;
	private HumanmgtDao humanmgtDao;
	
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		Integer id = Integer.parseInt(humanId);
		humanmgtDao.tRecover(id);
		request.setAttribute("pageNow", request.getParameter("pageNow"));
		System.out.println("pageNow is: " + request.getParameter("pageNow"));
		return SUCCESS;
	}
	

	public String getHumanId() {
		return humanId;
	}
	public void setHumanId(String humanId) {
		this.humanId = humanId;
	}
	public HumanDao getHumanDao() {
		return humanDao;
	}
	public void setHumanDao(HumanDao humanDao) {
		this.humanDao = humanDao;
	}
	public HumanmgtDao getHumanmgtDao() {
		return humanmgtDao;
	}
	public void setHumanmgtDao(HumanmgtDao humanmgtDao) {
		this.humanmgtDao = humanmgtDao;
	}
	@Override
	public void setServletRequest(HttpServletRequest request) {
		// TODO Auto-generated method stub
		this.request = request;
	}

	@Override
	public void setServletResponse(HttpServletResponse response) {
		// TODO Auto-generated method stub
		this.response = response;
	}

	@Override
	public void setSession(Map att) {
		// TODO Auto-generated method stub
		this.att = att;
	}
}
